#ifndef QMLVIRTUALKEYBOARD_H
#define QMLVIRTUALKEYBOARD_H
#include <QObject>
#include <QTimer>
QT_BEGIN_NAMESPACE
class QWidget;
class QLineEdit;
class QQuickWidget;
class QString;
QT_END_NAMESPACE
class QmlVirtualKeyboard:public QObject{
    Q_OBJECT
public:
    QmlVirtualKeyboard(QWidget *parent);
    ~QmlVirtualKeyboard();
    void show(QLineEdit *now);
    void hide();
protected:
    void recoverObjWidget();
    void moveObjWidget(QLineEdit *edit);
protected slots:
    void onFocusChanged(QWidget *old,QWidget *now);
    void onRectangleHide();
    void onVisibleChanged();
private:
    void establishConnection();
    QWidget *m_kbd = nullptr;
    QWidget *m_obj = nullptr;
    void bindingInputMethod();
};

#endif // QMLVIRTUALKEYBOARD_H
